﻿Public Class BS

    Private Sub BacsiBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs) Handles BacsiBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.BacsiBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.PcvgppDataSet)

    End Sub

    Private Sub BS_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'PcvgppDataSet.bacsi' table. You can move, or remove it, as needed.
        Me.BacsiTableAdapter.Fill(Me.PcvgppDataSet.bacsi)

    End Sub

    Private Sub MaTextEdit_Validating(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MaTextEdit.Validating
        'If IsDBNull(Me.MaTextEdit.EditValue) Or Me.MaTextEdit.EditValue.ToString = "" Then
        If IsDBNull(Me.MaTextEdit.EditValue) Then
            Me.MaTextEdit.ErrorText = "MA KO DC RONG"
            e.Cancel = True
        End If
    End Sub
End Class